Skip to content

Conversation

@surister
Copy link
Member

@surister surister commented Nov 6, 2025

Summary of the changes / Why this is an improvement

Implements clustered options for CrateDB models.

Example:

    class MetaOptions(CrateModel):
        id = models.IntegerField()
        one = models.TextField()
        two = models.TextField()
        three = models.TextField()

        class Meta:
            app_label = "ignore"
            clustered_by = "one"
            number_of_shards = 3

Checklist

Copy link
Member

@amotl amotl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🚀

Comment on lines -52 to +55
if auto_refresh and self.pk: # If self.pk is available, its an insert.
if auto_refresh and self.pk: # If self.pk is available, it's an insert.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know much about the dataflow, architecture, and program data model of the Django ORM, so please don't consider this to be valid question: It's just a curious one.

Couldn't a record including a primary key also be an UPDATE operation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess so, yeah, the comment is not 'complete'

@surister surister force-pushed the feat/clustered_tables branch from 96fae6f to 17b92c9 Compare November 10, 2025 09:41
@surister surister force-pushed the feat/clustered_tables branch from 1f81929 to da6f1f1 Compare November 10, 2025 09:43
@surister surister merged commit 2657622 into master Nov 10, 2025
2 checks passed
@surister surister deleted the feat/clustered_tables branch November 10, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement clustered_by in class meta options

3 participants